#include "usart_task.h"

#include "main.h"
#include <stdio.h>

/* USER CODE BEGIN 0 */


uint8_t cmd = 0;

void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
	if(huart->Instance == USART1){
		HAL_UART_Transmit(&huart1, &cmd, sizeof(cmd),10000);
		if(cmd == 0xA1){
			HAL_UART_Transmit(&huart1, &cmd, sizeof(cmd),10000);
		}
		if(cmd == 0xA2){
			HAL_UART_Transmit(&huart1, &cmd, sizeof(cmd),10000);
		}
		HAL_UART_Receive_IT(&huart1, &cmd, 1);
	}
}

/* USER CODE END 0 */





